package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {
    @Select("select count(*)from sky_take_out.setmeal_dish sd where sd.dish_id = #{dishid}")
    Long countbydishid(Long dishid);


@Select("select * from sky_take_out.setmeal_dish where setmeal_id = #{setmealid}")
    List<SetmealDish> getdishsbyid(Long setmealid);

    void insert(List<SetmealDish> setmealDishes);

   void delete(List<Long> setmealIds);

   @Delete("delete from setmeal_dish where setmeal_id = #{setmealId}")
   void deletebysetmealid(Long setmealId);
}
